{include file="public/header" /}
<style>
    .layui-form-item{
        font-size: 14px !important;
        width: 94%;
        margin: 0 auto;
    }
    .layui-form-item .layui-form-label {
        text-overflow:unset !important;
    }
    .upimage{
        margin-right: 20px;
        width: 100px;
        height: 100px;
        border: none !important;
    }
    .redcontent {
        margin-top: 20px;
        margin-bottom: 20px;
        color: red;
        line-height: 30px;
    }
    .header{
        z-index: 999;
    }
</style>
<body>
    <div class="header">
        <i class="layui-icon layui-icon-left goBack"></i>商家入驻
    </div>
    <div class="x-body">
        <form action="{:url('merchant/save')}" method="post" id="form" class="layui-form">
            <input type="hidden" value="bonus" id="pay_way" name="pay_way"/>
            <div class="layui-form-item">
                <label class="layui-form-label">商家名称 </label>
                <div class="layui-input-inline">
                    <input type="text" name="title" value="{$info?$info.title:''}" lay-verify="required" lay-reqtext="请填写商家名称" placeholder="请填写商家名称"
                        class="layui-input" lay-verType="tips" autocomplete="off"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">联系人 </label>
                <div class="layui-input-inline">
                    <input type="text" name="contacts" value="{$info?$info.contacts:''}" lay-verify="required" lay-reqtext="请填写联系人" placeholder="请填写联系人"
                        class="layui-input" lay-verType="tips" autocomplete="off"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">联系电话 </label>
                <div class="layui-input-inline">
                    <input  type="tel" maxlength="11"   name="contacts_tel" value="{$info?$info.contacts_tel:''}" lay-verify="required" lay-reqtext="请填写联系人电话" placeholder="请填写联系人电话"
                        class="layui-input" lay-verType="tips" autocomplete="off"/>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">Logo</label>
                <div class="layui-input-inline">
                    <p class="flex-center" style="width: 100%;height: 100px;justify-content:flex-end;">
                        <img src="{$info?$info.logo:''}" alt="" id="image_show" class="upimage" {if isset($info) && $info.logo == ''} style="display:none ;" {/if} >
                        <img src="/static/index/img/icon15.png" alt="" id="uploads_image">
                        <input type="hidden" value="{$info?$info.logo:''}" name="logo" id="images_value"/>
                    </p>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">商家照片</label>
                <div class="layui-input-inline">
                    <p class="flex-center" style="width: 100%;height: 100px;justify-content:flex-end;">
                        <img src="{$info?$info.banner:''}" alt="" id="image_banner" class="upimage" {if isset($info) && $info.banner == ''} style="display:none ;" {/if} >
                        <img src="/static/index/img/icon15.png" alt="" id="uploads_banner">
                        <input type="hidden" value="{$info?$info.banner:''}" name="banner" id="images_banner"/>
                    </p>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">营业执照</label>
                <div class="layui-input-inline">
                    <p class="flex-center" style="width: 100%;height: 100px;justify-content:flex-end;">
                        <img src="{$info?$info.business:''}" alt="" id="image_business" class="upimage" {if isset($info) && $info.business == ''} style="display:none ;" {/if} >
                        <img src="/static/index/img/icon15.png" alt="" id="uploads_business">
                        <input type="hidden" value="{$info?$info.business:''}" name="business" id="images_business"/>
                    </p>
                </div>
            </div>
            {notempty name="info"}
            <div class="layui-form-item redcontent" {if $info->getData('status') != 3} style=" display:none;" {/if}>
                {$info.reject_msg}
            </div>
            {/notempty}
            <ul class="recharge-nav flex-layout" {if $system.wechat_open != 1} style=" display: none;" {/if}>
                <li class="active" data-type="bonus">
                    <p class="flex-center">
                        <img src="/static/index/img/bonus.png" alt="">
                    </p>
                    <p>金币</p>
                    <img src="/static/index/img/icon22.png" alt="" class="img">
                </li>
                <li  data-type="wechat" >
                    <p class="flex-center">
                        <img src="/static/index/img/weixpayicon.png" alt="">
                    </p>
                    <p>微信支付</p>
                    <img src="/static/index/img/icon22.png" alt="" class="img" style="display: none;">
                </li>
            </ul>
            <p class="register-agr" style="text-align: center">
                <input type="checkbox" name="agree" lay-skin="primary" value="1">我已阅读并同意
                <span class="toggle"><a href="{:url('index/communal')}?type=merchant_msg">《商家入住须知》</a></span>
            </p>
            <button class="save" lay-filter="save" lay-submit formObj="#form">提交</button>
        </form>
    </div>
</body>
{include file="public/footer"/}
<script>
    $('.recharge-nav li').click(function (e) {
        $("#pay_way").val(e.currentTarget.dataset.type);
        $(this).addClass('active').siblings().removeClass('active')
        $(this).find('.img').show().parent().siblings().find('.img').hide()
    })
</script>
</html>